package com.qidianit.mes.pojo.pro;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @Description:
 * @Author: shanzhe
 * @Date: 2025/9/26 - 13:48
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProductionReport {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String reportCode;
    private Integer reportType;
    private Long productionOrderId;
    private String productionOrderCode;
    private Integer workflowId;
    private String workflowCode;
    private String workflowName; // 【新增】
    private Long processId;
    private String processName;
    private Long taskListId;
    private String taskCode;
    private BigDecimal reportedQuantity;
    private BigDecimal qualifiedQuantity;
    private BigDecimal unqualifiedQuantity;
    private Long reporterId;
    private String reporterName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime reportTime;

    private Long approverId; // 【新增】
    private String approverName; // 【新增】

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime approvalTime; // 【新增】

    private String remark;
    private Integer status;
    private Long createdBy;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;

    private Long updatedBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedTime;

    @TableLogic
    private Integer deleteFlag;
}
